<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
for(int i=0;i<Integer.parseInt(request.getParameter("layers"));i++)
{
	out.println("<br>Слой "+i+": <input name=layer"+i+"> ");
}
out.println("<input type=submit>");
%>